﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Escuela.Forms;

namespace Escuela
{
    public partial class Main : Form
    {
        //controlador
        private Instituto inst;
        
        public Main()
        {
            InitializeComponent();
            this.inst = new Instituto();
        }

        private void salirToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void alumnosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Alumnos fal = new Alumnos(this.inst);
            fal.Show(this);
        }

        private void cursosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Cursos Cur = new Cursos(inst);
            Cur.Show(this);
        }

        private void profesoresToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Profesores pr = new Profesores(this.inst);
            pr.Show(this);
        }

        private void Main_Load(object sender, EventArgs e)
        {
            
        }

        private void materiaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MateriaForm tc = new MateriaForm(this.inst);
            tc.Show(this);
        }

        private void registrarIngresoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            IngresoForm ing = new IngresoForm(this.inst);
            ing.Show(this);
        }

        private void registrarEgresoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            EgresoForm egr = new EgresoForm(this.inst);
            egr.Show(this);
        }

        private void cierreDiarioToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CierreDiarioForm cd = new CierreDiarioForm(this.inst);
            cd.Show(this);
            
        }

        private void cierreMensualToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CierreMensualForm cm = new CierreMensualForm(this.inst);
            cm.Show(this);
        }

        private void salirToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            this.Close();
            this.Dispose();
        }

        private void acercaDeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AcercaDeForm cm = new AcercaDeForm(this.inst);
            cm.Show(this);
        }

        private void movimientosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                MovimientosForm cm = new MovimientosForm(this.inst);
                cm.Show(this);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error abriendo formulario. " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

        private void alumnosMorososToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                AlumnosMorosos am = new AlumnosMorosos(this.inst);
                am.Show(this);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error abriendo formulario. " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            Alumnos fal = new Alumnos(this.inst);
            fal.Show(this);
        }

        private void pictureBox2_Click(object sender, EventArgs e)
        {
            Profesores pr = new Profesores(this.inst);
            pr.Show(this);
        }

        private void pictureBox4_Click(object sender, EventArgs e)
        {
            MateriaForm tc = new MateriaForm(this.inst);
            tc.Show(this);
        }

        private void pictureBox3_Click(object sender, EventArgs e)
        {
            Cursos Cur = new Cursos(inst);
            Cur.Show(this);
        }

        private void pictureBox5_Click(object sender, EventArgs e)
        {
            CierreDiarioForm cd = new CierreDiarioForm(this.inst);
            cd.Show(this);
        }

        private void pictureBox6_Click(object sender, EventArgs e)
        {
            CierreMensualForm cm = new CierreMensualForm(this.inst);
            cm.Show(this);
        }

        private void pictureBox7_Click(object sender, EventArgs e)
        {
            IngresoForm ing = new IngresoForm(this.inst);
            ing.Show(this);
        }

        private void pictureBox8_Click(object sender, EventArgs e)
        {
            EgresoForm egr = new EgresoForm(this.inst);
            egr.Show(this);
        }

        private void pictureBox9_Click(object sender, EventArgs e)
        {
            try
            {
                MovimientosForm cm = new MovimientosForm(this.inst);
                cm.Show(this);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error abriendo formulario. " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

        private void pictureBox10_Click(object sender, EventArgs e)
        {
            try
            {
                AlumnosMorosos am = new AlumnosMorosos(this.inst);
                am.Show(this);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error abriendo formulario. " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

        private void notificacionesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                NotificacionesForm nf  = new NotificacionesForm(this.inst);
                nf.Show(this);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error abriendo formulario. " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

        

        
    }
}
